<?php

namespace App\Http\Requests;

use App\Http\Requests\BaseFormRequest;

class SystemRequest extends BaseFormRequest
{

    public function authorize()
    {
        return true;
    }


    public function scenes()
    {
        return [
            'storeEmail'=>[
                'wa_emailusername' => 'required|email|max:100',
                'wa_emailpasswd' => 'required|max:20',
                'wa_SMTPserver' => 'required|max:100',
			],
			'storeSms'=>[
				'wa_SmsPlatURL' => 'required',
            ],
            'store3d'=>[
				'wa_3DPlatURL' => 'required',
            ],
            'storeVoice'=>[
                'wa_VLTermID' => 'required',
            ],
            // 'storeUpgrade'=>[
            //     'webapp_path' => 'sometimes|required',
            //     'service_path' => 'sometimes|required',
            // ],
        ];
    }
	
	public function messages()
    {
        return [
            'wa_emailusername.required' => '邮箱用户不能为空',
            'wa_emailusername.email' => '邮箱格式不正确',
            'wa_emailpasswd.required' => '邮箱密码不能为空',
            'wa_SMTPserver.required' => '邮箱服务器不能为空',
            'wa_SmsPlatURL.required' => '短信服务地址不能为空',
            'wa_3DPlatURL.required' => '邮箱格式不正确',
            'wa_VLTermID.required' => '远程终端不能为空',
            'webapp_path.required' => '应用文件不能为空',
            'service_path.required' => '服务文件不能为空',
        ];
    }
	
	public function withValidator($validator)
	{

	}
}
